<%--
  Created by IntelliJ IDEA.
  User: 王宝田
  Date: 2022/6/27
  Time: 10:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>登录</title>
</head>
<style type="text/css">
    body{
        background-image: url("../images/ww.jpg");
        background-size:contain;
        background-size:cover;
        background-repeat:no-repeat;
    }

</style>
<body >
<div align="center">
    <form name="form" method="post" >
        <font face="宋体" size="6"><strong>登录</strong></font><br/><hr/><br/>
    </form>
    <form name="form1" method="post" action="login" onsubmit="return userCheck()">
        用户名：
        <input name="uname" type="text" %/>
        <br/><br/>
        密&nbsp;&nbsp;码：
        <input name="upassword" type="text" %/>
        <br /><br />
        身  份：
        <select name="role">
            <option  value="parent">家长</option>
            <option  value="teacher">老师</option>
        </select>
        <input type="submit" name="Submit" value="登录" />
        <input type="reset" name="Submit1" value="重置" />

    </form>
    <hr/>
    <a href="AddUser">注册用户</a><br/>

</div>
<script type="text/javascript">
    function userCheck(){
        if(document.form.uname.value==""){
            window.alert("请输入用户名");
            return false;
        }
        if(document.form.upassword.value==""){
            window.alert("请输入用户密码");
            return false;
        }
        return true;
    }
</script>
</body>
</html>